<html>
<head>
<LINK REL="SHORTCUT ICON" 
HREF="favicon.ico">
</head>
<body>

<?php
	require 'connect.php';
	if($_GET != null && isset($_GET['type'])){
		if($_GET['type'] == "new"){
			echo <<< END
			<form method="POST" action="events.php">
			<b>Event name:</b> <input type="text" name="eventname" /><br /> <br />
			<b>Event Relevance:</b> <br /> 
			<input type="checkbox" name="relevance" value="yfg" /> YFG <br />
			<input type="checkbox" name="relevance" value="constituency" /> Constituency <br />
			<input type="checkbox" name="relevance" value="fgbranch" /> Fine Gael branch <br /> <br />
			<b>Event Type:</b> <br />
			<input type="checkbox" name="eventtype" value="canvass" /> Canvass <br />
			<input type="checkbox" name="eventtype" value="drop" /> Leaflet Drop <br />
			<input type="checkbox" name="eventtype" value="meeting" /> Meeting <br /><br />
			<b>Event Location:</b> <input type="text" name="location" /> <br /><br />
			<b>Event Date:</b> <input type="date" name="date" /><br /><br />
			<b>Time:</b> <input type="time" name="time" /><br /><br />
			<input type="submit" value="Submit" /> 
			</form>
END;
		}
		else if($_GET['type'] == "edit"){
			echo <<< END
			<br />
			Show a list of events here, and allow the user to pick one and proceed to a page with parameters something like <b>.php?type=edit&id=123</b>
			<br />
END;

		}
	}
	else{
		echo "<a href=\"events.php?type=new\">Create new event</a><br />
		<a href=\"events.php?type=edit\">Edit event details</a><br /><br />";
		echo "<a href=\"events.php?type=attendance\">Attendance</a><br />";
	}

	echo "<br /><br /><a href=\"index.php\">Home</a>";
?>

</body>
</html>
